﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace ModuleConfig
{
    public class Port
    {
        public string Name
        {
            get;
            set;
        }
        public Port(string portname)
        {
            Name = portname;
        }
    }

    public class CurrentPort : INotifyPropertyChanged
    {
        public CurrentPort()
        { }

        private string _port = "";
        public string Port
        {
            get { return _port; }
            set
            {
                if (_port != value)
                {
                    _port = value;
                    NotifyPropertyChanged("Port");
                }
            }
        }

        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }

}
